<%@ page language="java" import="java.util.*" pageEncoding="UTF-8" %>
<%@taglib prefix="s" uri="/struts-tags" %>
<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://"
            + request.getServerName() + ":" + request.getServerPort()
            + path + "/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
    <base href="<%=basePath%>">

    <title>申请查看</title>
    <link type="text/css" href="css/base.css" rel="stylesheet"/>
    <meta http-equiv="pragma" content="no-cache">
    <meta http-equiv="cache-control" content="no-cache">
    <meta http-equiv="expires" content="0">
    <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
    <meta http-equiv="description" content="This is my page">
    <script type="text/javascript" src="js/jquery.min.js"></script>
    <script type="text/javascript" src="../js/menu.js"></script>
    <script type="text/javascript">
        function checkBad() {
            $("#good").val("");
        }
    </script>
</head>

<body>
<%@ include file="/page/share/menu.jsp" %>

<div id="content">
    <form method="post" action="Application!changeState.action">
        <input type="hidden" name="id" value="${application.id}"/>
        <input type="hidden" name="newsId" value="${news.id}"/>
        <table>
            <tr>
                <td align="right">
                    编号：
                </td>
                <td>
                    ${application.id}
                </td>
            </tr>
            <tr>
                <td align="right">
                    主题：
                </td>
                <td>
                    ${news.content}
                </td>
            </tr>
            <tr>
                <td align="right">
                    申请人：
                </td>
                <td>
                    ${application.applyStudent.studentName}(宿舍：${application.applyStudent.dormitory.dormitoryId})
                </td>
            </tr>
            <tr>
                <td align="right">
                    更换人：
                </td>
                <td>
                    ${application.exchange.studentName}(宿舍：${application.exchange.dormitory.dormitoryId})
                </td>
            </tr>
            <tr>
                <td align="right">
                    申请时间：
                </td>
                <td>
                    <fmt:formatDate value="${application.applyTime}" pattern="yyyy年MM月dd日 HH:mm"/>
                </td>
            </tr>
            <tr>
                <td align="right">
                    备注：
                </td>
                <td>
                    ${application.reMarks}
                </td>
            </tr>
            <tr>
                <td>
                    <input type="hidden" value="agree" id="good" name="reMarks"/>
                    <input type="submit" value="同意" id="agree"/>
                </td>
                <td>
                    <input type="submit" value="不同意" id="disagree" onclick="checkBad()"/>
                </td>
            </tr>
        </table>
    </form>
</div>


<div id="footer">
    <p style="text-align: center;color: #757575;padding: 20px 0px 0px 0px; font:12px;">Copyright © 2010-2013 蓝天白云团队
        版权所有</p>
</div>
</body>
</html>